package com.youshang520i.demo.config;


import com.youshang520i.demo.LocalConditionalOnBean;
import com.youshang520i.demo.MyBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @LocalConditionalOnBean 自定义注解
 */
@LocalConditionalOnBean(value = "myConfig2")
@Configuration()
public class MyConfig {

    @Bean
    public MyBean myBean1() {
        System.out.println("MyConfig.myBean1()");
        return new MyBean();
    }
}